Skip to content

chore: prefer project-local uv over global pipx for ruff/pytest#270

Merged
MinhHaDuong merged 3 commits into
mainfrom
pipx-uv-cleanup
Jun 23, 2026
Merged

chore: prefer project-local uv over global pipx for ruff/pytest#270
MinhHaDuong merged 3 commits into
mainfrom
pipx-uv-cleanup

Conversation

@MinhHaDuong

@MinhHaDuong MinhHaDuong commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Context

Two commits that had been sitting unpushed on local main (predating the 2026-06-22 incident work), now moved onto a branch so they land through review instead of directly on main.

Changes

  • Replace pipx install advice with uv run instructions.
  • Add a TODO to remove the global pipx installs of ruff and pytest (they shadow the project-local versions managed by uv and cause version drift).

Touches TODO.md and pyproject.toml only.

🤖 Generated with Claude Code

Ticket: none

MinhHaDuong and others added 2 commits June 23, 2026 09:33
Dev tools are already in [dependency-groups] dev, so pipx is unnecessary
and causes global leaks (e.g. mypy_cache in unrelated projects).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MinhHaDuong

Copy link
Copy Markdown
Collaborator Author

/gaze actions

round: 1
adherence: PASS — 0 blocking
review-pr: skipped (size-gate: 11 lines, 2 files)
simplify: 0 fixes applied
fix agent: n/a

Mechanical checks run directly (no .py and no .claude/rules/*.md touched):

  • pyproject.toml parses as valid TOML.
  • Comment claim verified: ruff, mypy, pytest, pre-commit are all genuinely present in [dependency-groups].dev, so the uv run … instructions replacing the old pipx advice are accurate.
  • Both commits trace 1:1 to the two changes named in the PR body; no scope overflow, no foreign files.
  • Prose in new TODO.md is clean (concrete, no LLMisms).

/verify-gate verdict

verdict: ESCALATE

Exit criteria: none — this PR references no ticket (no Ticket: line, no tickets/*.erg for this work). The gate validates change completeness against ticket exit criteria; with zero criteria it cannot render APPROVED on its own authority.

Unresolved review comments: none
Unresolved simplify: none
Adherence: PASS (0)

Rationale:
The change itself is correct, minimal (11 lines, 2 files), and well-scoped: it swaps stale pipx install advice for the uv-managed reality and adds a TODO to uninstall the shadowing global pipx tools. All technical claims check out and CI is green. The only blocker is procedural — the harness requires every change to land through the ticketed flow, and /gaze's setup circuit-breaker treats an absent ticket as ESCALATE rather than auto-approving outside that flow. Human disposition needed: either attach/declare Ticket: none for this chore and re-run /gaze, or --force-approve with a reason. The skill never merges.

/gaze stopped: no ticket referenced. This is a ticketless chore; needs a human Ticket: none declaration + re-run, or /gaze 270 --force-approve <reason>.

telemetry: wall=na agents=0 tokens=na cost~=na

@MinhHaDuong

Copy link
Copy Markdown
Collaborator Author

Review of PR 270

Factual correctness: The project does manage all four dev tools (ruff, pytest, mypy, pre-commit) via uv in [dependency-groups] dev. The new pyproject.toml comment is accurate.

Inconsistency — minor blocker: The old comment recommended pipx install ruff pytest mypy pre-commit (four tools). The new TODO.md narrows the uninstall instruction to only pipx uninstall ruff pytest, leaving mypy and pre-commit unaddressed. A developer following this TODO would still have stale global mypy and pre-commit shadowing the uv-managed versions — exactly the problem being fixed.

Suggested fix for TODO.md line 3:

- [ ] Remove global pipx installs of ruff, pytest, mypy, and pre-commit
      (`pipx uninstall ruff pytest mypy pre-commit`).

Prose: Clean. The pyproject.toml comment is an improvement — concise and accurate.

Scope note (no-follow): A repo-root TODO.md is an unusual artifact for a developer action item that has a natural home in a ticket or CONTRIBUTING doc. Worth considering whether this belongs there instead, but not a blocker.

The TODO's uninstall command and prose named only ruff and pytest, but
the pyproject.toml comment it replaced flagged four uv-managed dev tools:
ruff, pytest, mypy, and pre-commit (all confirmed in [dependency-groups]
dev). Leaving global mypy and pre-commit installs in place keeps shadowing
the uv-managed versions -- the exact drift this PR set out to fix. Extend
the uninstall command to all four and generalize the prose to `uv run
<tool>`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@MinhHaDuong

Copy link
Copy Markdown
Collaborator Author

/gaze actions

round: 2
adherence: PASS — 0 blocking (no Python/scripts/rules touched; no adherence suite applicable)
review-pr: skipped (size-gate: 11 lines, 2 files)
review (built-in): 1 comment posted — 1 verifiable: minor (TODO covered only 2 of 4 uv-managed tools)
simplify: 0 fixes (documentation-only change, no code)
fix agent: 1 commit (1778f5f — extend TODO to all four uv-managed tools)

/verify-gate verdict

verdict: APPROVED

Exit criteria (PR declares Ticket: none — its stated changes are the contract):

  • Replace pipx install advice with uv run instructions: ADDRESSED — commit a729d5e, pyproject.toml:46-47
  • Add a TODO to remove global pipx installs: ADDRESSED — TODO.md created (50c8f96), extended to all four uv-managed tools (1778f5f)

Unresolved review comments: none — round-1 verifiable: minor resolved by 1778f5f (TODO now covers ruff, pytest, mypy, pre-commit, consistent with the replaced pyproject comment and [dependency-groups] dev); nofollow: TODO.md-location note muted by tag
Unresolved simplify: none
Adherence: PASS (0 blocking)

Rationale:
A two-file documentation change: pyproject.toml swaps stale pipx install advice for uv run instructions, and a new TODO.md records the follow-up to uninstall the shadowing global tools. Round 1 surfaced one verifiable discrepancy — the TODO uninstalled only ruff and pytest while the replaced pyproject comment and the dev dependency group name four uv-managed tools (ruff, pytest, mypy, pre-commit), so global mypy and pre-commit would still shadow uv versions, the exact drift the change targets. The round-1 fix agent extended the TODO to all four tools; the discrepancy is gone and the file is now internally consistent. No code, scripts, or rules were touched, so adherence is trivially clean. All CI checks pass. No scope overflow. APPROVED — the caller merges.

telemetry: wall=360s agents=2 tokens=na cost=na

@MinhHaDuong MinhHaDuong merged commit 0415bb4 into main Jun 23, 2026
5 checks passed
@MinhHaDuong MinhHaDuong deleted the pipx-uv-cleanup branch June 23, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant